import request from "@/utils/request";

// 查询项目接口列表
export function listInterface(query) {
  return request({
    url: "/dmsIms/interface/list",
    method: "get",
    params: query,
  });
}

// 查询项目接口信息简易列表
export function SimplelistInterface(id) {
  return request({
    url: "/dmsIms/interface/splist/" + id,
    method: "get",
  });
}

// 查询项目接口详细信息
export function DetailInterface(query) {
  return request({
    url: "/dmsIms/interface/delist",
    method: "get",
    params: query,
  });
}

// 查询项目接口详细
export function getInterface(id) {
  return request({
    url: "/dmsIms/interface/" + id,
    method: "get",
  });
}

// 新增项目接口
export function addInterface(data) {
  return request({
    url: "/dmsIms/interface",
    method: "post",
    data: data,
  });
}

// 修改项目接口
export function updateInterface(data) {
  return request({
    url: "/dmsIms/interface",
    method: "put",
    data: data,
  });
}

// 删除项目接口
export function delInterface(id) {
  return request({
    url: "/dmsIms/interface/" + id,
    method: "delete",
  });
}

// 执行接口
export function executeInterface(id) {
  return request({
    url: "/dmsIms/interface/execute/" + id,
    method: "get",
  });
}

export function dmsExecute(data) {
  return request({
    url: "/dmsIms/interface/dmsExecute",
    method: "post",
    data: data,
  });
}
